package com.example.myapplication.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.fragment.app.Fragment;

import com.example.myapplication.R;

/**
 * A simple {@link Fragment} subclass.
 */
public class f4 extends Fragment {

    public f4() {
        // Required empty public constructor
    }
    public  static  f4 getInstance(String title){
        f4 f4=new f4();
        Bundle bundle=new Bundle();
        bundle.putString("title",title);
        f4.setArguments(bundle);
        return f4;
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view=inflater.inflate(R.layout.fragment_f4, container, false);
        TextView text=(TextView)view.findViewById(R.id.f4text);
        Bundle bundle=getArguments();
        text.setText(bundle.getString("title"));
        return view;

    }
}
